
ThisBuild / version := "0.1.0-SNAPSHOT"

ThisBuild / scalaVersion := "2.11.8"

val sparkVer = "2.1.1"
val kafkaVer = "1.1.0"
val flinkVer = "1.8.3"


assembly / assemblyMergeStrategy := {
  case PathList("META-INF", xs_*) => MergeStrategy.discard
  case x                             => MergeStrategy.first
}


lazy val root = (project in file("."))
  .settings(
    name := "spark-process",
    libraryDependencies ++= Seq(
      "mysql" % "mysql-connector-java" % "5.1.49",
      "org.apache.spark" %% "spark-core" % sparkVer  withSources(),
      "org.apache.spark" %% "spark-sql" % sparkVer  withSources(),
      "org.apache.spark" %% "spark-streaming" % sparkVer ,
      "org.apache.spark" %% "spark-streaming-kafka-0-10" % sparkVer ,

      "org.apache.kafka" %% "kafka" % kafkaVer,
      "org.apache.kafka" % "kafka-clients" % kafkaVer,
      "org.apache.flink" %% "flink-streaming-scala" % flinkVer % "provided",
      "org.apache.flink" %% "flink-scala" % flinkVer,
      "org.apache.flink" %% "flink-connector-kafka" % flinkVer,
//      "org.apache.flink" %% "flink-table-planner-blink" % "1.9.0" , // SQL planner
      "org.apache.flink" %% "flink-table-api-scala-bridge" % flinkVer % "provided",
      "org.apache.flink" %% "flink-table-planner" % flinkVer , // SQL planner
      "org.apache.flink" %% "flink-cep" % flinkVer , // SQL planner


    ),
    dependencyOverrides ++= Seq(
      "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.6.5",
      "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.5",
      "com.fasterxml.jackson.core" % "jackson-core" % "2.6.5"
    )
//    mainClass := Some("Main")



  )
